package com.meiyou.test;


import org.springframework.web.servlet.config.annotation.EnableWebMvc;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurerAdapter;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;  


  
//@Configuration  
//@EnableWebSocket  
//public class WebSocketConfig implements WebSocketConfigurer {  
//    @Override  
//    public void registerWebSocketHandlers(WebSocketHandlerRegistry registry) {  
//        registry.addHandler(chatMessageHandler(),"/webSocketServer").addInterceptors(new ChatHandshakeInterceptor());  
//        registry.addHandler(chatMessageHandler(), "/sockjs/webSocketServer").addInterceptors(new ChatHandshakeInterceptor()).withSockJS();  
//    }  
//   
//    @Bean  
//    public TextWebSocketHandler chatMessageHandler(){  
//        return new ChatMessageHandler();  
//    }  
//  
//}  